<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">

//返回6个值： number string boolean undefined object function

        var num = true;
        var num = 123;
        var num = "123";
       // var type = typeof(num);
        var type = typeof num; //可以不加括号用空格代替，最好使用括号
        console.log(type);
    </script>


    <script type="text/javascript">
        var res = '1' * 2;
        console.log(typeof(res) + ":", res);//加逗号在一行连着分别输出

        var num = '2' - '1';
        console.log(typeof(num) + ":", num);
    </script>
</body>
</html>





